package com.example.ViewPagerSum.domain;

import org.json.JSONException;
import org.json.JSONObject;

import java.io.Serializable;

/**
 * ============================================================
 * author：     王景
 * <p/>
 * time：       2015/9/13  22:52.
 * <p/>
 * email:     wjontheway@163.com
 * <p/>
 * description： 图片实体
 * <p/>
 * ============================================================
 */
public class MmPhoto implements Serializable {
    private String title;
    private int id;
    private String img;


    public void parseJson(JSONObject itemObject) throws JSONException {
        String img = itemObject.getString("img");
        String title = itemObject.getString("title");
        int id = itemObject.getInt("id");
        setImg(img);
        setTitle(title);
        setId(id);
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getImg() {
        return img;
    }

    public void setImg(String img) {
        this.img = img;
    }
}
